function init() {
    var spoilerBlocks = document.querySelectorAll("span.spoiler");

    for (var i=0; i < spoilerBlocks.length; i++) {
        var e = spoilerBlocks[i];
        e.addEventListener("mouseover", function() {
            this.className = "spoiler_show";
        }, false);

        e.addEventListener("mouseout", function() {
            this.className = "spoiler";
        }, false);
    }
};

window.addEventListener("load", init, false);   

